Optimal. Leaf size=141 \[ -\frac {6 a \sin (c+d x)}{d^4}+\frac {6 a x \cos (c+d x)}{d^3}+\frac {3 a x^2 \sin (c+d x)}{d^2}-\frac {a x^3 \cos (c+d x)}{d}+\frac {120 b \sin (c+d x)}{d^6}-\frac {120 b x \cos (c+d x)}{d^5}-\frac {60 b x^2 \sin (c+d x)}{d^4}+\frac {20 b x^3 \cos (c+d x)}{d^3}+\frac {5 b x^4 \sin (c+d x)}{d^2}-\frac {b x^5 \cos (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {3339, 3296, 2637} \[ \frac {3 a x^2 \sin (c+d x)}{d^2}-\frac {6 a \sin (c+d x)}{d^4}+\frac {6 a x \cos (c+d x)}{d^3}-\frac {a x^3 \cos (c+d x)}{d}+\frac {5 b x^4 \sin (c+d x)}{d^2}-\frac {60 b x^2 \sin (c+d x)}{d^4}+\frac {20 b x^3 \cos (c+d x)}{d^3}+\frac {120 b \sin (c+d x)}{d^6}-\frac {120 b x \cos (c+d x)}{d^5}-\frac {b x^5 \cos (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 3296
Rule 3339
Rubi steps
\begin {align*} \int x^3 \left (a+b x^2\right ) \sin (c+d x) \, dx &=\int \left (a x^3 \sin (c+d x)+b x^5 \sin (c+d x)\right ) \, dx\\ &=a \int x^3 \sin (c+d x) \, dx+b \int x^5 \sin (c+d x) \, dx\\ &=-\frac {a x^3 \cos (c+d x)}{d}-\frac {b x^5 \cos (c+d x)}{d}+\frac {(3 a) \int x^2 \cos (c+d x) \, dx}{d}+\frac {(5 b) \int x^4 \cos (c+d x) \, dx}{d}\\ &=-\frac {a x^3 \cos (c+d x)}{d}-\frac {b x^5 \cos (c+d x)}{d}+\frac {3 a x^2 \sin (c+d x)}{d^2}+\frac {5 b x^4 \sin (c+d x)}{d^2}-\frac {(6 a) \int x \sin (c+d x) \, dx}{d^2}-\frac {(20 b) \int x^3 \sin (c+d x) \, dx}{d^2}\\ &=\frac {6 a x \cos (c+d x)}{d^3}+\frac {20 b x^3 \cos (c+d x)}{d^3}-\frac {a x^3 \cos (c+d x)}{d}-\frac {b x^5 \cos (c+d x)}{d}+\frac {3 a x^2 \sin (c+d x)}{d^2}+\frac {5 b x^4 \sin (c+d x)}{d^2}-\frac {(6 a) \int \cos (c+d x) \, dx}{d^3}-\frac {(60 b) \int x^2 \cos (c+d x) \, dx}{d^3}\\ &=\frac {6 a x \cos (c+d x)}{d^3}+\frac {20 b x^3 \cos (c+d x)}{d^3}-\frac {a x^3 \cos (c+d x)}{d}-\frac {b x^5 \cos (c+d x)}{d}-\frac {6 a \sin (c+d x)}{d^4}-\frac {60 b x^2 \sin (c+d x)}{d^4}+\frac {3 a x^2 \sin (c+d x)}{d^2}+\frac {5 b x^4 \sin (c+d x)}{d^2}+\frac {(120 b) \int x \sin (c+d x) \, dx}{d^4}\\ &=-\frac {120 b x \cos (c+d x)}{d^5}+\frac {6 a x \cos (c+d x)}{d^3}+\frac {20 b x^3 \cos (c+d x)}{d^3}-\frac {a x^3 \cos (c+d x)}{d}-\frac {b x^5 \cos (c+d x)}{d}-\frac {6 a \sin (c+d x)}{d^4}-\frac {60 b x^2 \sin (c+d x)}{d^4}+\frac {3 a x^2 \sin (c+d x)}{d^2}+\frac {5 b x^4 \sin (c+d x)}{d^2}+\frac {(120 b) \int \cos (c+d x) \, dx}{d^5}\\ &=-\frac {120 b x \cos (c+d x)}{d^5}+\frac {6 a x \cos (c+d x)}{d^3}+\frac {20 b x^3 \cos (c+d x)}{d^3}-\frac {a x^3 \cos (c+d x)}{d}-\frac {b x^5 \cos (c+d x)}{d}+\frac {120 b \sin (c+d x)}{d^6}-\frac {6 a \sin (c+d x)}{d^4}-\frac {60 b x^2 \sin (c+d x)}{d^4}+\frac {3 a x^2 \sin (c+d x)}{d^2}+\frac {5 b x^4 \sin (c+d x)}{d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.18, size = 92, normalized size = 0.65 \[ \frac {\left (3 a d^2 \left (d^2 x^2-2\right )+5 b \left (d^4 x^4-12 d^2 x^2+24\right )\right ) \sin (c+d x)-d x \left (a d^2 \left (d^2 x^2-6\right )+b \left (d^4 x^4-20 d^2 x^2+120\right )\right ) \cos (c+d x)}{d^6} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.64, size = 95, normalized size = 0.67 \[ -\frac {{\left (b d^{5} x^{5} + {\left (a d^{5} - 20 \, b d^{3}\right )} x^{3} - 6 \, {\left (a d^{3} - 20 \, b d\right )} x\right )} \cos \left (d x + c\right ) - {\left (5 \, b d^{4} x^{4} - 6 \, a d^{2} + 3 \, {\left (a d^{4} - 20 \, b d^{2}\right )} x^{2} + 120 \, b\right )} \sin \left (d x + c\right )}{d^{6}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.87, size = 97, normalized size = 0.69 \[ -\frac {{\left (b d^{5} x^{5} + a d^{5} x^{3} - 20 \, b d^{3} x^{3} - 6 \, a d^{3} x + 120 \, b d x\right )} \cos \left (d x + c\right )}{d^{6}} + \frac {{\left (5 \, b d^{4} x^{4} + 3 \, a d^{4} x^{2} - 60 \, b d^{2} x^{2} - 6 \, a d^{2} + 120 \, b\right )} \sin \left (d x + c\right )}{d^{6}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 449, normalized size = 3.18 \[ \frac {\frac {b \left (-\left (d x +c \right )^{5} \cos \left (d x +c \right )+5 \left (d x +c \right )^{4} \sin \left (d x +c \right )+20 \left (d x +c \right )^{3} \cos \left (d x +c \right )-60 \left (d x +c \right )^{2} \sin \left (d x +c \right )+120 \sin \left (d x +c \right )-120 \left (d x +c \right ) \cos \left (d x +c \right )\right )}{d^{2}}-\frac {5 b c \left (-\left (d x +c \right )^{4} \cos \left (d x +c \right )+4 \left (d x +c \right )^{3} \sin \left (d x +c \right )+12 \left (d x +c \right )^{2} \cos \left (d x +c \right )-24 \cos \left (d x +c \right )-24 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{2}}+a \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \left (d x +c \right ) \cos \left (d x +c \right )\right )+\frac {10 b \,c^{2} \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \left (d x +c \right ) \cos \left (d x +c \right )\right )}{d^{2}}-3 a c \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )-\frac {10 b \,c^{3} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{2}}+3 a \,c^{2} \left (\sin \left (d x +c \right )-\left (d x +c \right ) \cos \left (d x +c \right )\right )+\frac {5 b \,c^{4} \left (\sin \left (d x +c \right )-\left (d x +c \right ) \cos \left (d x +c \right )\right )}{d^{2}}+a \,c^{3} \cos \left (d x +c \right )+\frac {b \,c^{5} \cos \left (d x +c \right )}{d^{2}}}{d^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.34, size = 372, normalized size = 2.64 \[ \frac {a c^{3} \cos \left (d x + c\right ) + \frac {b c^{5} \cos \left (d x + c\right )}{d^{2}} - 3 \, {\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} a c^{2} - \frac {5 \, {\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} b c^{4}}{d^{2}} + 3 \, {\left ({\left ({\left (d x + c\right )}^{2} - 2\right )} \cos \left (d x + c\right ) - 2 \, {\left (d x + c\right )} \sin \left (d x + c\right )\right )} a c + \frac {10 \, {\left ({\left ({\left (d x + c\right )}^{2} - 2\right )} \cos \left (d x + c\right ) - 2 \, {\left (d x + c\right )} \sin \left (d x + c\right )\right )} b c^{3}}{d^{2}} - {\left ({\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \cos \left (d x + c\right ) - 3 \, {\left ({\left (d x + c\right )}^{2} - 2\right )} \sin \left (d x + c\right )\right )} a - \frac {10 \, {\left ({\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \cos \left (d x + c\right ) - 3 \, {\left ({\left (d x + c\right )}^{2} - 2\right )} \sin \left (d x + c\right )\right )} b c^{2}}{d^{2}} + \frac {5 \, {\left ({\left ({\left (d x + c\right )}^{4} - 12 \, {\left (d x + c\right )}^{2} + 24\right )} \cos \left (d x + c\right ) - 4 \, {\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \sin \left (d x + c\right )\right )} b c}{d^{2}} - \frac {{\left ({\left ({\left (d x + c\right )}^{5} - 20 \, {\left (d x + c\right )}^{3} + 120 \, d x + 120 \, c\right )} \cos \left (d x + c\right ) - 5 \, {\left ({\left (d x + c\right )}^{4} - 12 \, {\left (d x + c\right )}^{2} + 24\right )} \sin \left (d x + c\right )\right )} b}{d^{2}}}{d^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.34, size = 121, normalized size = 0.86 \[ \frac {6\,\sin \left (c+d\,x\right )\,\left (20\,b-a\,d^2\right )}{d^6}+\frac {x^3\,\cos \left (c+d\,x\right )\,\left (20\,b-a\,d^2\right )}{d^3}-\frac {3\,x^2\,\sin \left (c+d\,x\right )\,\left (20\,b-a\,d^2\right )}{d^4}-\frac {6\,x\,\cos \left (c+d\,x\right )\,\left (20\,b-a\,d^2\right )}{d^5}-\frac {b\,x^5\,\cos \left (c+d\,x\right )}{d}+\frac {5\,b\,x^4\,\sin \left (c+d\,x\right )}{d^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 4.13, size = 168, normalized size = 1.19 \[ \begin {cases} - \frac {a x^{3} \cos {\left (c + d x \right )}}{d} + \frac {3 a x^{2} \sin {\left (c + d x \right )}}{d^{2}} + \frac {6 a x \cos {\left (c + d x \right )}}{d^{3}} - \frac {6 a \sin {\left (c + d x \right )}}{d^{4}} - \frac {b x^{5} \cos {\left (c + d x \right )}}{d} + \frac {5 b x^{4} \sin {\left (c + d x \right )}}{d^{2}} + \frac {20 b x^{3} \cos {\left (c + d x \right )}}{d^{3}} - \frac {60 b x^{2} \sin {\left (c + d x \right )}}{d^{4}} - \frac {120 b x \cos {\left (c + d x \right )}}{d^{5}} + \frac {120 b \sin {\left (c + d x \right )}}{d^{6}} & \text {for}\: d \neq 0 \\\left (\frac {a x^{4}}{4} + \frac {b x^{6}}{6}\right ) \sin {\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________